import { combineReducers } from 'redux';
import * as  actionTypes from './constants'
import { reducer as homeReducer } from '../views/Home/store/index'
const defaultstate={
    index:'/',
    readNum:0,
    goodNum:0
}
const appReducer = (state = defaultstate, action) => {
    switch (action.type) {
        case actionTypes.SET_INDEX:
            return {...state, index: action.data }
        default:
            return state;
    }
}

export default combineReducers({
    app:appReducer,
    home: homeReducer,
    // server: ServerReducer
});